package entity;


import com.alibaba.fastjson.annotation.JSONField;

import javax.xml.crypto.Data;
import java.util.Date;

@lombok.Data
public class Article {

    @JSONField(ordinal = 1)
    private Integer id;
    //通过uid关联作者对象
    private User user;
    @JSONField(ordinal = 2)
    private String title;
    @JSONField(ordinal = 3)
    private String summary;
    @JSONField(ordinal = 4)
    private String content;
    private Integer liketotal;
    private Integer looktotal;
    private Integer commenttotal;
    private Integer wordtotal;
    @JSONField(serialize = false)
    private Integer status;
    @JSONField(format = "yyy-MM-dd hh:mm:ss")
    private Date addtime;

    public Article() {
    }

    public Article(Integer id, User user, String title, String summary, String content, Integer liketotal, Integer looktotal, Integer commenttotal, Integer wordtotal, Integer status, Date addtime) {
        this.id = id;
        this.user = user;
        this.title = title;
        this.summary = summary;
        this.content = content;
        this.liketotal = liketotal;
        this.looktotal = looktotal;
        this.commenttotal = commenttotal;
        this.wordtotal = wordtotal;
        this.status = status;
        this.addtime = addtime;
    }



}
